import request from "@/util/request";

//获取客户列表
export const clientListService = () => {
    return request.get("/normal/clientList");
}

//获取技师列表
export const technicianListService = () => {
    return request.get("/normal/technicianList");
}

//获取食物列表
export const foodListService = () => {
    return request.get("normal/foodList");
}


//根据id获取房间详情
export const getRoomByIdService = (id, roomPrice) => {
    return request.post("/normal/getRoomById", {
        id: id,
        roomPrice: roomPrice
    })
}

//开房
export const openRoomService = (roomdata) => {
    return request.patch("/normal/openRoom", roomdata);
}

//退房重置房间信息
export const offRoomService = (id) => {
    return request.get("/normal/offRoom?id=" + id);
}

//下单食物
export const addFoodOrderService = (foodData) => {
    return request.post("/normal/addFoodOrder", foodData);
}

//结账
export const addOrderService = (roomData) => {
    return request.post("/normal/addOrder", roomData)
}

//获取该房间所下单食物列表
export const getFoodsByRidService = (id) => {
    return request.get("/normal/getFoodsByRid", { params: { id: id } });
}

//分页条件查询客户信息
export const clientListByPageService = (clientData) => {
    return request.get("/normal/clientListByPage", {
        params: {
            ...clientData
        }
    })
}

//获取客户的会员与非会员数据
export const getClientVipCountService = () => {
    return request.get("/normal/getClientVipCount");
}

//根据id删除客户信息
export const deleteClientByIdService = (id) => {
    return request.delete("/normal/deleteClientById?id=" + id)
}

//根据id获取客户信息
export const getClientByIdService = (id) => {
    return request.get("/normal/getClientById?id=" + id);
}

//通过id对客户信息进行修改or充值
export const editClientByIdService = (clientData) => {
    return request.put("/normal/editClientById", clientData);
}
//新增客户信息
export const addClientService = (clientData) => {
    return request.post("/normal/addClient", clientData);
}
//获取订单列表
export const orderListService = () => {
    return request.get("/normal/orderList")
}